package com.xxh.cloud.provider.controller;

import com.xxh.cloud.common.dto.UserDto;
import com.xxh.cloud.common.vo.R;
import com.xxh.cloud.provider.service.inft.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ASUS
 * @date 2021/9/2 18:42
 */
@RestController
@Api(value = "",tags = "用户测试接口")
@RequestMapping("provider/user/")
public class UserController {
    @Autowired
    private UserService service;
    @ApiOperation(value = "",tags = "用户新增测试")
    @PostMapping("add.do")
    public R add(UserDto dto){
      return   service.register(dto);
    }

    @PostMapping("login.do")
    public R login(UserDto dto){
        return service.loginAccount(dto);
    }

    @PostMapping("login1,do")
    public R login1(UserDto dto){
        return service.loginCode(dto);
    }
}
